using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;
using My.IdlConverter.Core;
using My.IdlConverter.Core.Util;

namespace My.IdlConverter.Com
{
    public class ComPropertiesCollision : PropertiesCollision
    {
        public ComPropertiesCollision()
        {
        }

        public override int ResolveMethodId(Method resolvedMethod,int curMethodId)
        {
            int index = curMethodId;
            IList<Method> cacheMethods = CacheMethods;
            for (int i = 0; i < cacheMethods.Count; ++i)
            {
                //deubg usage
                if (resolvedMethod.PureName == "BlockPolyPolyLine")
                    Debug.Assert(false);

                if (ComplierHelper.IsInterProperty(cacheMethods[i], resolvedMethod))
                {
                    index = i;
                    break;
                }
            }

            return index;
        }

    }
}
